all: exploit

exploit: exp root
	tar czf exp.tar.gz exp root
	cp run.sh exploit
	fallocate -l 512 exploit
	dd if=exp.tar.gz of=exploit conv=notrunc oflag=append
	rm exp.tar.gz exp root

exp: exp.c params.h tools.h
	tar xzf deps.tar.gz
	gcc exp.c -static -Ldeps/lib -lnftnl -lmnl -lnl-3 -Ideps/include -o exp
	rm -r deps

root: root.c
	gcc root.c -static -o root

clean:
	rm -f exploit exp root
